package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class RoutineCharacteristics {

    private int beginIndex;
    private int endIndex;
    private List<RoutineCharacteristic> routineCharacteristicList;

    public RoutineCharacteristics(List<RoutineCharacteristic> routineCharacteristicList) {
        this.beginIndex = routineCharacteristicList.get(0).getBeginIndex();
        this.endIndex = routineCharacteristicList.get(routineCharacteristicList.size() - 1).getEndIndex();
        this.routineCharacteristicList = routineCharacteristicList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public boolean isEmpty() {
        if (routineCharacteristicList == null) {
            return true;
        }
        return routineCharacteristicList.isEmpty();
    }

    public int size() {
        return routineCharacteristicList.size();
    }

    public RoutineCharacteristic get(int index) {
        return routineCharacteristicList.get(index);
    }

}
